//
//  HNSH_ChatFriendDetailItem.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2023/2/22.
//

#import "HNSH_ChatFriendDetailItem.h"

@implementation HNSH_ChatFriendDetailItem

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self configUI];
    }
    return self;
}

- (void)configUI {
    self.backgroundColor = [UIColor appWhiteLabelColor];
    [self addSubview:self.titleLabel];
    [self addSubview:self.showImgV];
    
    self.userInteractionEnabled = YES;
    WeakSelf(weakSelf);
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id  _Nonnull sender) {
        if (weakSelf.clickBlock) {
            weakSelf.clickBlock();
        }
    }];
    [self addGestureRecognizer:tap];
}

#pragma mark lazy
- (UIImageView *)showImgV {
    if (!_showImgV) {
        _showImgV = [[UIImageView alloc]initWithFrame:CGRectMake(kScreenWidth-35-9, 14, 16, 16)];
        _showImgV.image = [UIImage imageNamed:@"base_nav_show_right"];
    }
    return _showImgV;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(16, 11, 200, 22)];
        _titleLabel.textColor = [UIColor appBlackLabelColor];
        _titleLabel.font = [UIFont systemFontOfSize:16];
    }
    return _titleLabel;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
